<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.4.35</title>


  <meta name="keywords" content="ruby,module,RubyXL::WorksheetConvenienceMethods">


    <meta name="description" content="Documentation for the RubyXL::WorksheetConvenienceMethods module">





<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
</script>

<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<link href="../css/fonts.css" rel="stylesheet">
<link href="../css/rdoc.css" rel="stylesheet">



<body id="top" role="document" class="module">
<div id="navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="true" aria-controls="navigation">
  <span aria-hidden="true">&#9776;</span>
</div>


<nav id="navigation" role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2>
    <a href="../index.html" rel="home">Home</a>
  </h2>

  <div id="table-of-contents-navigation">
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  

  

  

  

  

  


  <div class="nav-section">
    <h3>Instance Methods</h3>
    <ul class="link-list" role="directory">

      <li ><a href="#method-i-add_validation_list">add_validation_list</a></li>

      <li ><a href="#method-i-change_column_alignment">change_column_alignment</a></li>

      <li ><a href="#method-i-change_column_bold">change_column_bold</a></li>

      <li ><a href="#method-i-change_column_border">change_column_border</a></li>

      <li ><a href="#method-i-change_column_border_color">change_column_border_color</a></li>

      <li ><a href="#method-i-change_column_fill">change_column_fill</a></li>

      <li ><a href="#method-i-change_column_font">change_column_font</a></li>

      <li ><a href="#method-i-change_column_font_color">change_column_font_color</a></li>

      <li ><a href="#method-i-change_column_font_name">change_column_font_name</a></li>

      <li ><a href="#method-i-change_column_font_size">change_column_font_size</a></li>

      <li ><a href="#method-i-change_column_horizontal_alignment">change_column_horizontal_alignment</a></li>

      <li ><a href="#method-i-change_column_italics">change_column_italics</a></li>

      <li ><a href="#method-i-change_column_strikethrough">change_column_strikethrough</a></li>

      <li ><a href="#method-i-change_column_underline">change_column_underline</a></li>

      <li ><a href="#method-i-change_column_vertical_alignment">change_column_vertical_alignment</a></li>

      <li ><a href="#method-i-change_column_width">change_column_width</a></li>

      <li ><a href="#method-i-change_column_width_raw">change_column_width_raw</a></li>

      <li ><a href="#method-i-change_row_alignment">change_row_alignment</a></li>

      <li ><a href="#method-i-change_row_bold">change_row_bold</a></li>

      <li ><a href="#method-i-change_row_border">change_row_border</a></li>

      <li ><a href="#method-i-change_row_border_color">change_row_border_color</a></li>

      <li ><a href="#method-i-change_row_fill">change_row_fill</a></li>

      <li ><a href="#method-i-change_row_font">change_row_font</a></li>

      <li ><a href="#method-i-change_row_font_color">change_row_font_color</a></li>

      <li ><a href="#method-i-change_row_font_name">change_row_font_name</a></li>

      <li ><a href="#method-i-change_row_font_size">change_row_font_size</a></li>

      <li ><a href="#method-i-change_row_height">change_row_height</a></li>

      <li ><a href="#method-i-change_row_horizontal_alignment">change_row_horizontal_alignment</a></li>

      <li ><a href="#method-i-change_row_italics">change_row_italics</a></li>

      <li ><a href="#method-i-change_row_strikethrough">change_row_strikethrough</a></li>

      <li ><a href="#method-i-change_row_underline">change_row_underline</a></li>

      <li ><a href="#method-i-change_row_vertical_alignment">change_row_vertical_alignment</a></li>

      <li ><a href="#method-i-column_font">column_font</a></li>

      <li ><a href="#method-i-delete_cell">delete_cell</a></li>

      <li ><a href="#method-i-delete_column">delete_column</a></li>

      <li ><a href="#method-i-delete_row">delete_row</a></li>

      <li ><a href="#method-i-get_col_style">get_col_style</a></li>

      <li ><a href="#method-i-get_cols_style_index">get_cols_style_index</a></li>

      <li ><a href="#method-i-get_column_alignment">get_column_alignment</a></li>

      <li ><a href="#method-i-get_column_border">get_column_border</a></li>

      <li ><a href="#method-i-get_column_border_color">get_column_border_color</a></li>

      <li ><a href="#method-i-get_column_fill">get_column_fill</a></li>

      <li ><a href="#method-i-get_column_font_color">get_column_font_color</a></li>

      <li ><a href="#method-i-get_column_font_name">get_column_font_name</a></li>

      <li ><a href="#method-i-get_column_font_size">get_column_font_size</a></li>

      <li ><a href="#method-i-get_column_width">get_column_width</a></li>

      <li ><a href="#method-i-get_column_width_raw">get_column_width_raw</a></li>

      <li ><a href="#method-i-get_row_alignment">get_row_alignment</a></li>

      <li ><a href="#method-i-get_row_border">get_row_border</a></li>

      <li ><a href="#method-i-get_row_border_color">get_row_border_color</a></li>

      <li ><a href="#method-i-get_row_fill">get_row_fill</a></li>

      <li ><a href="#method-i-get_row_font_color">get_row_font_color</a></li>

      <li ><a href="#method-i-get_row_font_name">get_row_font_name</a></li>

      <li ><a href="#method-i-get_row_font_size">get_row_font_size</a></li>

      <li ><a href="#method-i-get_row_height">get_row_height</a></li>

      <li ><a href="#method-i-get_row_style">get_row_style</a></li>

      <li ><a href="#method-i-insert_cell">insert_cell</a></li>

      <li ><a href="#method-i-insert_column">insert_column</a></li>

      <li ><a href="#method-i-insert_row">insert_row</a></li>

      <li ><a href="#method-i-is_column_bolded">is_column_bolded</a></li>

      <li ><a href="#method-i-is_column_italicized">is_column_italicized</a></li>

      <li ><a href="#method-i-is_column_struckthrough">is_column_struckthrough</a></li>

      <li ><a href="#method-i-is_column_underlined">is_column_underlined</a></li>

      <li ><a href="#method-i-is_row_bolded">is_row_bolded</a></li>

      <li ><a href="#method-i-is_row_italicized">is_row_italicized</a></li>

      <li ><a href="#method-i-is_row_struckthrough">is_row_struckthrough</a></li>

      <li ><a href="#method-i-is_row_underlined">is_row_underlined</a></li>

      <li ><a href="#method-i-merge_cells">merge_cells</a></li>

      <li ><a href="#method-i-row_font">row_font</a></li>

    </ul>
  </div>



  <footer id="validator-badges" role="contentinfo">
  <p><a href="https://validator.w3.org/check/referer">Validate</a></p>
  <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.15.1.</p>
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>
</footer>

</nav>

<main role="main" aria-labelledby="module-RubyXL::WorksheetConvenienceMethods">
  
  
    <ol role="navigation" aria-label="Breadcrumb navigation" class="breadcrumb">
      
      <li>
        
        <a href="../RubyXL.html">RubyXL</a><span>::</span>
        
      </li>
      
      <li>
        
        <span>WorksheetConvenienceMethods</span>
        
      </li>
      
    </ol>
  

  <h1 id="module-RubyXL::WorksheetConvenienceMethods" class="anchor-link module">
    module RubyXL::WorksheetConvenienceMethods
  </h1>

  <section class="description">
    
  </section>


  <section id="5Buntitled-5D" class="documentation-section anchor-link">





    <section class="constants-list">
      <header>
        <h3>Constants</h3>
      </header>
      <dl>

        <dt id="BOLD">BOLD</dt>

        <dd>

          
        </dd>


        <dt id="COLOR">COLOR</dt>

        <dd>

          
        </dd>


        <dt id="ITALICS">ITALICS</dt>

        <dd>

          
        </dd>


        <dt id="NAME">NAME</dt>

        <dd>

          
        </dd>


        <dt id="SIZE">SIZE</dt>

        <dd>

          
        </dd>


        <dt id="STRIKETHROUGH">STRIKETHROUGH</dt>

        <dd>

          
        </dd>


        <dt id="UNDERLINE">UNDERLINE</dt>

        <dd>

          
        </dd>


      </dl>
    </section>





     <section id="public-instance-5Buntitled-5D-method-details" class="method-section anchor-link">
       <header>
         <h3>Public Instance Methods</h3>
       </header>


      <div id="method-i-add_validation_list" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-add_validation_list" title="Link to this method">
                <span class="method-name">add_validation_list</span>
                <span class="method-args">(ref, list_arr)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="add_validation_list-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 720</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_validation_list</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">list_arr</span>)
  <span class="ruby-comment"># &quot;Any double quote characters in the value should be escaped with another double quote.</span>
  <span class="ruby-comment"># If the value does not contain a comma, newline or double quote, then the String value should be returned unchanged.</span>
  <span class="ruby-comment"># If the value contains a comma, newline or double quote, then the String value should be returned enclosed in double quotes.&quot;</span>
  <span class="ruby-identifier">expr</span> = <span class="ruby-string">&#39;&quot;&#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">list_arr</span>.<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">str</span><span class="ruby-operator">|</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">&#39;&quot;&#39;</span>, <span class="ruby-string">&#39;&quot;&quot;&#39;</span>) }.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;,&#39;</span>) <span class="ruby-operator">+</span> <span class="ruby-string">&#39;&quot;&#39;</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">data_validations</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataValidations</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">data_validations</span> <span class="ruby-operator">&lt;&lt;</span>
    <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataValidation</span>.<span class="ruby-identifier">new</span>({<span class="ruby-value">:sqref</span>    <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ref</span>),
                                <span class="ruby-value">:formula1</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Formula</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:expression</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">expr</span>),
                                <span class="ruby-value">:type</span>     <span class="ruby-operator">=&gt;</span> <span class="ruby-string">&#39;list&#39;</span>})
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_alignment" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_alignment" title="Link to this method">
                <span class="method-name">change_column_alignment</span>
                <span class="method-args">(column_index, &amp;block)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_alignment-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 675</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)

  <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_alignment</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
  <span class="ruby-comment"># Excel gets confused if width is not explicitly set for a column that had alignment changes</span>
  <span class="ruby-identifier">change_column_width</span>(<span class="ruby-identifier">column_index</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">nil?</span>

  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_alignment</span>(<span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
  }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_bold" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_bold" title="Link to this method">
                <span class="method-name">change_column_bold</span>
                <span class="method-args">(column_index, bolded = false)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_bold-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 606</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_bold</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">bolded</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_bold</span>(<span class="ruby-identifier">bolded</span>)
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">BOLD</span>, <span class="ruby-identifier">bolded</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_border" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_border" title="Link to this method">
                <span class="method-name">change_column_border</span>
                <span class="method-args">(column_index, direction, weight)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_border-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 635</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_border</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)

  <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_border</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)

  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>]
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_border</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
  }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_border_color" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_border_color" title="Link to this method">
                <span class="method-name">change_column_border_color</span>
                <span class="method-args">(column_index, direction, color)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_border_color-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 649</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_border_color</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
  <span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color</span>)

  <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_border_color</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)

  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>]
    <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_border_color</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
  }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_fill" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_fill" title="Link to this method">
                <span class="method-name">change_column_fill</span>
                <span class="method-args">(column_index, color_code = &#39;ffffff&#39;)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_fill-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 401</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_fill</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">color_code</span> = <span class="ruby-string">&#39;ffffff&#39;</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color_code</span>)
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)

  <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_fill</span>(<span class="ruby-identifier">get_col_style</span>(<span class="ruby-identifier">column_index</span>), <span class="ruby-identifier">color_code</span>)

  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_fill</span>(<span class="ruby-identifier">color_code</span>)
  }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_font" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_font" title="Link to this method">
                <span class="method-name">change_column_font</span>
                <span class="method-args">(column_index, change_type, arg, font, xf)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_font-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 563</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)

  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">register_new_font</span>(<span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
  <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>).<span class="ruby-identifier">style_index</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">xf</span>)

  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">c</span> = <span class="ruby-identifier">row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
    <span class="ruby-identifier">c</span>.<span class="ruby-identifier">font_switch</span>(<span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
  }
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Helper method to update the fonts and cell styles array main method to change font, called from each separate font mutator method</p>


        </div>





      </div>


      <div id="method-i-change_column_font_color" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_font_color" title="Link to this method">
                <span class="method-name">change_column_font_color</span>
                <span class="method-args">(column_index, font_color=&#39;000000&#39;)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_font_color-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 590</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font_color</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">font_color</span>=<span class="ruby-string">&#39;000000&#39;</span>)
  <span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">font_color</span>)

  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_rgb_color</span>(<span class="ruby-identifier">font_color</span>)
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">COLOR</span>, <span class="ruby-identifier">font_color</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_font_name" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_font_name" title="Link to this method">
                <span class="method-name">change_column_font_name</span>
                <span class="method-args">(column_index = 0, font_name = &#39;Verdana&#39;)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_font_name-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 576</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font_name</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_name</span> = <span class="ruby-string">&#39;Verdana&#39;</span>)
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_name</span>(<span class="ruby-identifier">font_name</span>)
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">NAME</span>, <span class="ruby-identifier">font_name</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_font_size" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_font_size" title="Link to this method">
                <span class="method-name">change_column_font_size</span>
                <span class="method-args">(column_index, font_size=10)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_font_size-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 583</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_font_size</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">font_size</span>=<span class="ruby-value">10</span>)
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_size</span>(<span class="ruby-identifier">font_size</span>)
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">SIZE</span>, <span class="ruby-identifier">font_size</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_horizontal_alignment" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_horizontal_alignment" title="Link to this method">
                <span class="method-name">change_column_horizontal_alignment</span>
                <span class="method-args">(column_index, alignment = &#39;center&#39;)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_horizontal_alignment-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 627</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_horizontal_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
  <span class="ruby-identifier">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">horizontal</span> = <span class="ruby-identifier">alignment</span> }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_italics" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_italics" title="Link to this method">
                <span class="method-name">change_column_italics</span>
                <span class="method-args">(column_index, italicized = false)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_italics-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 599</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_italics</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">italicized</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_italic</span>(<span class="ruby-identifier">italicized</span>)
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">ITALICS</span>, <span class="ruby-identifier">italicized</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_strikethrough" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_strikethrough" title="Link to this method">
                <span class="method-name">change_column_strikethrough</span>
                <span class="method-args">(column_index, struckthrough=false)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_strikethrough-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 620</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_strikethrough</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">struckthrough</span>=<span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_strikethrough</span>(<span class="ruby-identifier">struckthrough</span>)
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">STRIKETHROUGH</span>, <span class="ruby-identifier">struckthrough</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_underline" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_underline" title="Link to this method">
                <span class="method-name">change_column_underline</span>
                <span class="method-args">(column_index, underlined = false)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_underline-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 613</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_underline</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">underlined</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">font_id</span>].<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_underline</span>(<span class="ruby-identifier">underlined</span>)
  <span class="ruby-identifier">change_column_font</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">UNDERLINE</span>, <span class="ruby-identifier">underlined</span>, <span class="ruby-identifier">font</span>, <span class="ruby-identifier">xf</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_vertical_alignment" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_vertical_alignment" title="Link to this method">
                <span class="method-name">change_column_vertical_alignment</span>
                <span class="method-args">(column_index, alignment = &#39;center&#39;)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_vertical_alignment-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 631</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_vertical_alignment</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
  <span class="ruby-identifier">change_column_alignment</span>(<span class="ruby-identifier">column_index</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">vertical</span> = <span class="ruby-identifier">alignment</span> }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_column_width" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_width" title="Link to this method">
                <span class="method-name">change_column_width</span>
                <span class="method-args">(column_index, width_in_chars = RubyXL::ColumnRange::DEFAULT_WIDTH)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_width-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 384</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_width</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">width_in_chars</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">ColumnRange</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_WIDTH</span>)
  <span class="ruby-identifier">change_column_width_raw</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">ColumnRange</span><span class="ruby-operator">::</span><span class="ruby-identifier">chars2raw</span>(<span class="ruby-identifier">width_in_chars</span>))
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Get column width measured in number of digits, as per <a href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx">msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx</a></p>


        </div>





      </div>


      <div id="method-i-change_column_width_raw" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_column_width_raw" title="Link to this method">
                <span class="method-name">change_column_width_raw</span>
                <span class="method-args">(column_index, width)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_column_width_raw-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 374</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_column_width_raw</span>(<span class="ruby-identifier">column_index</span>, <span class="ruby-identifier">width</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">range</span>.<span class="ruby-identifier">width</span> = <span class="ruby-identifier">width</span>
  <span class="ruby-identifier">range</span>.<span class="ruby-identifier">custom_width</span> = <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Set raw column width value</p>


        </div>





      </div>


      <div id="method-i-change_row_alignment" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_alignment" title="Link to this method">
                <span class="method-name">change_row_alignment</span>
                <span class="method-args">(row, &amp;block)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_alignment-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 662</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)

  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_alignment</span>(<span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row</span>), <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)

  <span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_alignment</span>(<span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
  }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_bold" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_bold" title="Link to this method">
                <span class="method-name">change_row_bold</span>
                <span class="method-args">(row = 0, bolded = false)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_bold-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 531</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_bold</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">bolded</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_bold</span>(<span class="ruby-identifier">bolded</span>)
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">BOLD</span>, <span class="ruby-identifier">bolded</span>, <span class="ruby-identifier">font</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_border" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_border" title="Link to this method">
                <span class="method-name">change_row_border</span>
                <span class="method-args">(row, direction, weight)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_border-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 457</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)

  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_border</span>(<span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row</span>), <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>)

  <span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_border</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">weight</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
  }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_border_color" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_border_color" title="Link to this method">
                <span class="method-name">change_row_border_color</span>
                <span class="method-args">(row, direction, color = &#39;000000&#39;)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_border_color-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 468</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_border_color</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span> = <span class="ruby-string">&#39;000000&#39;</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">color</span>)

  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_border_color</span>(<span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row</span>), <span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>)

  <span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_border_color</span>(<span class="ruby-identifier">direction</span>, <span class="ruby-identifier">color</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
  }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_fill" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_fill" title="Link to this method">
                <span class="method-name">change_row_fill</span>
                <span class="method-args">(row_index = 0, rgb = &#39;ffffff&#39;)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_fill-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 480</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_fill</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">rgb</span> = <span class="ruby-string">&#39;ffffff&#39;</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)
  <span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">rgb</span>)

  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row_index</span>].<span class="ruby-identifier">style_index</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">modify_fill</span>(<span class="ruby-identifier">get_row_style</span>(<span class="ruby-identifier">row_index</span>), <span class="ruby-identifier">rgb</span>)
  <span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row_index</span>].<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">change_fill</span>(<span class="ruby-identifier">rgb</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_font" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_font" title="Link to this method">
                <span class="method-name">change_row_font</span>
                <span class="method-args">(row_index, change_type, arg, font)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_font-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 492</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>, <span class="ruby-identifier">font</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)

  <span class="ruby-identifier">xf</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">register_new_font</span>(<span class="ruby-identifier">font</span>, <span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row_index</span>))
  <span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row_index</span>]
  <span class="ruby-identifier">row</span>.<span class="ruby-identifier">style_index</span> = <span class="ruby-identifier">workbook</span>.<span class="ruby-identifier">register_new_xf</span>(<span class="ruby-identifier">xf</span>)
  <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">font_switch</span>(<span class="ruby-identifier">change_type</span>, <span class="ruby-identifier">arg</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> }
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Helper method to update the row styles array change_type - <a href="WorksheetConvenienceMethods.html#NAME"><code>NAME</code></a> or <a href="WorksheetConvenienceMethods.html#SIZE"><code>SIZE</code></a> or <a href="WorksheetConvenienceMethods.html#COLOR"><code>COLOR</code></a> etc main method to change font, called from each separate font mutator method</p>


        </div>





      </div>


      <div id="method-i-change_row_font_color" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_font_color" title="Link to this method">
                <span class="method-name">change_row_font_color</span>
                <span class="method-args">(row = 0, font_color = &#39;000000&#39;)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_font_color-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 516</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_color</span> = <span class="ruby-string">&#39;000000&#39;</span>)
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-constant">Color</span>.<span class="ruby-identifier">validate_color</span>(<span class="ruby-identifier">font_color</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_rgb_color</span>(<span class="ruby-identifier">font_color</span>)
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">COLOR</span>, <span class="ruby-identifier">font_color</span>, <span class="ruby-identifier">font</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_font_name" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_font_name" title="Link to this method">
                <span class="method-name">change_row_font_name</span>
                <span class="method-args">(row = 0, font_name = &#39;Verdana&#39;)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_font_name-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 502</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font_name</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_name</span> = <span class="ruby-string">&#39;Verdana&#39;</span>)
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_name</span>(<span class="ruby-identifier">font_name</span>)
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">NAME</span>, <span class="ruby-identifier">font_name</span>, <span class="ruby-identifier">font</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_font_size" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_font_size" title="Link to this method">
                <span class="method-name">change_row_font_size</span>
                <span class="method-args">(row = 0, font_size=10)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_font_size-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 509</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_font_size</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">font_size</span>=<span class="ruby-value">10</span>)
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_size</span>(<span class="ruby-identifier">font_size</span>)
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">SIZE</span>, <span class="ruby-identifier">font_size</span>, <span class="ruby-identifier">font</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_height" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_height" title="Link to this method">
                <span class="method-name">change_row_height</span>
                <span class="method-args">(row = 0, height = 10)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_height-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 552</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_height</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">height</span> = <span class="ruby-value">10</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)

  <span class="ruby-identifier">c</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]
  <span class="ruby-identifier">c</span>.<span class="ruby-identifier">ht</span> = <span class="ruby-identifier">height</span>
  <span class="ruby-identifier">c</span>.<span class="ruby-identifier">custom_height</span> = <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_horizontal_alignment" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_horizontal_alignment" title="Link to this method">
                <span class="method-name">change_row_horizontal_alignment</span>
                <span class="method-args">(row = 0, alignment = &#39;center&#39;)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_horizontal_alignment-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 445</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_horizontal_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-identifier">change_row_alignment</span>(<span class="ruby-identifier">row</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">horizontal</span> = <span class="ruby-identifier">alignment</span> }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_italics" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_italics" title="Link to this method">
                <span class="method-name">change_row_italics</span>
                <span class="method-args">(row = 0, italicized = false)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_italics-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 524</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_italics</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">italicized</span> = <span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_italic</span>(<span class="ruby-identifier">italicized</span>)
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">ITALICS</span>, <span class="ruby-identifier">italicized</span>, <span class="ruby-identifier">font</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_strikethrough" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_strikethrough" title="Link to this method">
                <span class="method-name">change_row_strikethrough</span>
                <span class="method-args">(row = 0, struckthrough=false)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_strikethrough-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 545</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_strikethrough</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">struckthrough</span>=<span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_strikethrough</span>(<span class="ruby-identifier">struckthrough</span>)
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">STRIKETHROUGH</span>, <span class="ruby-identifier">struckthrough</span>, <span class="ruby-identifier">font</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_underline" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_underline" title="Link to this method">
                <span class="method-name">change_row_underline</span>
                <span class="method-args">(row = 0, underlined=false)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_underline-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 538</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_underline</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">underlined</span>=<span class="ruby-keyword">false</span>)
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">dup</span>
  <span class="ruby-identifier">font</span>.<span class="ruby-identifier">set_underline</span>(<span class="ruby-identifier">underlined</span>)
  <span class="ruby-identifier">change_row_font</span>(<span class="ruby-identifier">row</span>, <span class="ruby-constant">Worksheet</span><span class="ruby-operator">::</span><span class="ruby-constant">UNDERLINE</span>, <span class="ruby-identifier">underlined</span>, <span class="ruby-identifier">font</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-change_row_vertical_alignment" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-change_row_vertical_alignment" title="Link to this method">
                <span class="method-name">change_row_vertical_alignment</span>
                <span class="method-args">(row = 0, alignment = &#39;center&#39;)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="change_row_vertical_alignment-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 451</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change_row_vertical_alignment</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">alignment</span> = <span class="ruby-string">&#39;center&#39;</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-identifier">change_row_alignment</span>(<span class="ruby-identifier">row</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">vertical</span> = <span class="ruby-identifier">alignment</span> }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-column_font" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-column_font" title="Link to this method">
                <span class="method-name">column_font</span>
                <span class="method-args">(col)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="column_font-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 432</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">column_font</span>(<span class="ruby-identifier">col</span>)
  <span class="ruby-identifier">validate_workbook</span>

  <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">fonts</span>[<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)].<span class="ruby-identifier">font_id</span>]
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-delete_cell" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-delete_cell" title="Link to this method">
                <span class="method-name">delete_cell</span>
                <span class="method-args">(row_index = 0, column_index=0, shift=nil)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="delete_cell-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 40</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delete_cell</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>=<span class="ruby-value">0</span>, <span class="ruby-identifier">shift</span>=<span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row_index</span>)
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)

  <span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">row_index</span>]
  <span class="ruby-identifier">old_cell</span> = <span class="ruby-identifier">row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]

  <span class="ruby-keyword">case</span> <span class="ruby-identifier">shift</span>
  <span class="ruby-keyword">when</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>] = <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:left</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">row</span>.<span class="ruby-identifier">delete_cell_shift_left</span>(<span class="ruby-identifier">column_index</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:up</span> <span class="ruby-keyword">then</span>
    (<span class="ruby-identifier">row_index</span><span class="ruby-operator">...</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>)).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">old_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>]
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
        <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] = <span class="ruby-keyword">nil</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">index</span>)
        <span class="ruby-identifier">c</span> = <span class="ruby-identifier">new_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>] = <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">column_index</span>]
        <span class="ruby-identifier">c</span>.<span class="ruby-identifier">row</span> = (<span class="ruby-identifier">index</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Cell</span>)
      <span class="ruby-keyword">end</span>
    }
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;invalid shift option&#39;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">old_cell</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>by default, only sets cell to nil if :left is specified, method will shift row contents to the right of the deleted cell to the left if :up is specified, method will shift column contents below the deleted cell upward</p>


        </div>





      </div>


      <div id="method-i-delete_column" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-delete_column" title="Link to this method">
                <span class="method-name">delete_column</span>
                <span class="method-args">(column_index = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="delete_column-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 204</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delete_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)

  <span class="ruby-comment"># Delete column</span>
  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span> <span class="ruby-identifier">row</span>&amp;.<span class="ruby-identifier">cells</span>&amp;.<span class="ruby-identifier">delete_at</span>(<span class="ruby-identifier">column_index</span>) }

  <span class="ruby-comment"># Update column numbers for cells to the right of the deleted column</span>
  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each_with_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span>, <span class="ruby-identifier">ci</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">c</span>.<span class="ruby-identifier">column</span> = <span class="ruby-identifier">ci</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Cell</span>)
    }
  }

  <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">range</span><span class="ruby-operator">|</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">delete_column</span>(<span class="ruby-identifier">column_index</span>) }

  <span class="ruby-comment"># Update row number of merged cells</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span>

  <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">column_index</span><span class="ruby-operator">..</span><span class="ruby-identifier">column_index</span>) }
  <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">column_index</span>

    <span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">column_index</span>
    <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
      <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span>,
      <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span>,
      <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
      <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>,
    )
  }

  <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">single_cell?</span> }
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-delete_row" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-delete_row" title="Link to this method">
                <span class="method-name">delete_row</span>
                <span class="method-args">(row_index=0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="delete_row-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 126</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delete_row</span>(<span class="ruby-identifier">row_index</span>=<span class="ruby-value">0</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row_index</span>)

  <span class="ruby-identifier">deleted</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">delete_at</span>(<span class="ruby-identifier">row_index</span>)

  <span class="ruby-comment"># Update row number of each cell</span>
  <span class="ruby-identifier">row_index</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>[<span class="ruby-identifier">index</span>]
    <span class="ruby-identifier">row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">row</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> }
  }

  <span class="ruby-comment"># Update row number of merged cells</span>
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span> <span class="ruby-operator">==</span> (<span class="ruby-identifier">row_index</span><span class="ruby-operator">..</span><span class="ruby-identifier">row_index</span>) }
    <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
      <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">row_index</span>

      <span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">row_index</span>
      <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">-</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>,
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span>,
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span>,
      )
    }
    <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">single_cell?</span> }
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">deleted</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_col_style" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_col_style" title="Link to this method">
                <span class="method-name">get_col_style</span>
                <span class="method-args">(column_index)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_col_style-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 389</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_col_style</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">locate_range</span>(<span class="ruby-identifier">column_index</span>)
  (<span class="ruby-identifier">range</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">style_index</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Helper method to get the style index for a column</p>


        </div>





      </div>


      <div id="method-i-get_cols_style_index" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_cols_style_index" title="Link to this method">
                <span class="method-name">get_cols_style_index</span>
                <span class="method-args">(column_index)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_cols_style_index-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 315</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_cols_style_index</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">locate_range</span>(<span class="ruby-identifier">column_index</span>)
  (<span class="ruby-identifier">range</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">style_index</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_column_alignment" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_column_alignment" title="Link to this method">
                <span class="method-name">get_column_alignment</span>
                <span class="method-args">(col, type)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_column_alignment-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 438</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_alignment</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">type</span>)
  <span class="ruby-identifier">validate_workbook</span>

  <span class="ruby-identifier">xf</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)]
  <span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">xf</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">type</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_column_border" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_column_border" title="Link to this method">
                <span class="method-name">get_column_border</span>
                <span class="method-args">(col, border_direction)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_column_border-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 416</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_border</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">border_direction</span>)
  <span class="ruby-identifier">validate_workbook</span>

  <span class="ruby-identifier">xf</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)]
  <span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span>]
  <span class="ruby-identifier">border</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_style</span>(<span class="ruby-identifier">border_direction</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_column_border_color" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_column_border_color" title="Link to this method">
                <span class="method-name">get_column_border_color</span>
                <span class="method-args">(col, border_direction)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_column_border_color-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 424</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_border_color</span>(<span class="ruby-identifier">col</span>, <span class="ruby-identifier">border_direction</span>)
  <span class="ruby-identifier">validate_workbook</span>

  <span class="ruby-identifier">xf</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">cell_xfs</span>[<span class="ruby-identifier">get_cols_style_index</span>(<span class="ruby-identifier">col</span>)]
  <span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">xf</span>.<span class="ruby-identifier">border_id</span>]
  <span class="ruby-identifier">border</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_color</span>(<span class="ruby-identifier">border_direction</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_column_fill" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_column_fill" title="Link to this method">
                <span class="method-name">get_column_fill</span>
                <span class="method-args">(col=0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_column_fill-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 394</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_fill</span>(<span class="ruby-identifier">col</span>=<span class="ruby-value">0</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">col</span>)

  <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">get_fill_color</span>(<span class="ruby-identifier">get_col_xf</span>(<span class="ruby-identifier">col</span>))
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_column_font_color" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_column_font_color" title="Link to this method">
                <span class="method-name">get_column_font_color</span>
                <span class="method-args">(col = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_column_font_color-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 331</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_font_color</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_rgb_color</span> <span class="ruby-operator">||</span> <span class="ruby-string">&#39;000000&#39;</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_column_font_name" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_column_font_name" title="Link to this method">
                <span class="method-name">get_column_font_name</span>
                <span class="method-args">(col = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_column_font_name-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 321</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_font_name</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_column_font_size" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_column_font_size" title="Link to this method">
                <span class="method-name">get_column_font_size</span>
                <span class="method-args">(col = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_column_font_size-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 326</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_font_size</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_column_width" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_column_width" title="Link to this method">
                <span class="method-name">get_column_width</span>
                <span class="method-args">(column_index = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_column_width-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 367</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_width</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">width</span> = <span class="ruby-identifier">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">ColumnRange</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_WIDTH</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">width</span>.<span class="ruby-identifier">nil?</span>
  (<span class="ruby-identifier">width</span> <span class="ruby-operator">-</span> (<span class="ruby-value">5.0</span> <span class="ruby-operator">/</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Font</span><span class="ruby-operator">::</span><span class="ruby-constant">MAX_DIGIT_WIDTH</span>)).<span class="ruby-identifier">round</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Get column width measured in number of digits, as per <a href="http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx">msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx</a></p>


        </div>





      </div>


      <div id="method-i-get_column_width_raw" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_column_width_raw" title="Link to this method">
                <span class="method-name">get_column_width_raw</span>
                <span class="method-args">(column_index = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_column_width_raw-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 357</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_column_width_raw</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">column_index</span>)

  <span class="ruby-identifier">range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">locate_range</span>(<span class="ruby-identifier">column_index</span>)
  <span class="ruby-identifier">range</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">range</span>.<span class="ruby-identifier">width</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Get raw column width value as stored in the file</p>


        </div>





      </div>


      <div id="method-i-get_row_alignment" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_row_alignment" title="Link to this method">
                <span class="method-name">get_row_alignment</span>
                <span class="method-args">(row, is_horizontal)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_row_alignment-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 304</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_alignment</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">is_horizontal</span>)
  <span class="ruby-identifier">validate_workbook</span>

  <span class="ruby-identifier">xf_obj</span> = <span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">xf_obj</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">nil?</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">is_horizontal</span> <span class="ruby-keyword">then</span> <span class="ruby-keyword">return</span> <span class="ruby-identifier">xf_obj</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">horizontal</span>
  <span class="ruby-keyword">else</span>                  <span class="ruby-keyword">return</span> <span class="ruby-identifier">xf_obj</span>.<span class="ruby-identifier">alignment</span>.<span class="ruby-identifier">vertical</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_row_border" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_row_border" title="Link to this method">
                <span class="method-name">get_row_border</span>
                <span class="method-args">(row, border_direction)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_row_border-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 286</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_border</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">border_direction</span>)
  <span class="ruby-identifier">validate_workbook</span>

  <span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">border_id</span>]
  <span class="ruby-identifier">border</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_style</span>(<span class="ruby-identifier">border_direction</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_row_border_color" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_row_border_color" title="Link to this method">
                <span class="method-name">get_row_border_color</span>
                <span class="method-args">(row, border_direction)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_row_border_color-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 293</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_border_color</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">border_direction</span>)
  <span class="ruby-identifier">validate_workbook</span>

  <span class="ruby-identifier">border</span> = <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">borders</span>[<span class="ruby-identifier">get_row_xf</span>(<span class="ruby-identifier">row</span>).<span class="ruby-identifier">border_id</span>]
  <span class="ruby-identifier">border</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">border</span>.<span class="ruby-identifier">get_edge_color</span>(<span class="ruby-identifier">border_direction</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_row_fill" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_row_fill" title="Link to this method">
                <span class="method-name">get_row_fill</span>
                <span class="method-args">(row = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_row_fill-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 245</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_fill</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
  (<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">get_fill_color</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_row_font_color" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_row_font_color" title="Link to this method">
                <span class="method-name">get_row_font_color</span>
                <span class="method-args">(row = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_row_font_color-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 257</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_font_color</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-identifier">color</span> = <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">color</span>
  <span class="ruby-identifier">color</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">color</span>.<span class="ruby-identifier">rgb</span> <span class="ruby-operator">||</span> <span class="ruby-string">&#39;000000&#39;</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_row_font_name" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_row_font_name" title="Link to this method">
                <span class="method-name">get_row_font_name</span>
                <span class="method-args">(row = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_row_font_name-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 249</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_font_name</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_name</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_row_font_size" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_row_font_size" title="Link to this method">
                <span class="method-name">get_row_font_size</span>
                <span class="method-args">(row = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_row_font_size-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 253</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_font_size</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">get_size</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_row_height" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_row_height" title="Link to this method">
                <span class="method-name">get_row_height</span>
                <span class="method-args">(row = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_row_height-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 279</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_height</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">validate_nonnegative</span>(<span class="ruby-identifier">row</span>)
  <span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]
  (<span class="ruby-identifier">row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">ht</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Row</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_HEIGHT</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_row_style" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_row_style" title="Link to this method">
                <span class="method-name">get_row_style</span>
                <span class="method-args">(row_index)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_row_style-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 240</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_row_style</span>(<span class="ruby-identifier">row_index</span>)
  <span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row_index</span>]
  (<span class="ruby-identifier">row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">style_index</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-insert_cell" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-insert_cell" title="Link to this method">
                <span class="method-name">insert_cell</span>
                <span class="method-args">(row = 0, col = 0, data = nil, formula = nil, shift = nil)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="insert_cell-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 11</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">insert_cell</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">data</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">formula</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">shift</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">col</span>)

  <span class="ruby-keyword">case</span> <span class="ruby-identifier">shift</span>
  <span class="ruby-keyword">when</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">then</span> <span class="ruby-comment"># No shifting at all</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:right</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">insert_cell_shift_right</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">col</span>)
  <span class="ruby-keyword">when</span> <span class="ruby-value">:down</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span>, <span class="ruby-value">:cells</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>].<span class="ruby-identifier">size</span>))
    (<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">downto</span>(<span class="ruby-identifier">row</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">old_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span>
        <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] = <span class="ruby-keyword">nil</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">index</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">index</span>)
        <span class="ruby-identifier">new_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">col</span>] = <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">cells</span>[<span class="ruby-identifier">col</span>]
      <span class="ruby-keyword">end</span>
    }
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;invalid shift option&#39;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">add_cell</span>(<span class="ruby-identifier">row</span>, <span class="ruby-identifier">col</span>, <span class="ruby-identifier">data</span>, <span class="ruby-identifier">formula</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-insert_column" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-insert_column" title="Link to this method">
                <span class="method-name">insert_column</span>
                <span class="method-args">(column_index = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="insert_column-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 160</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">insert_column</span>(<span class="ruby-identifier">column_index</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">column_index</span>)

  <span class="ruby-identifier">old_range</span> = <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">get_range</span>(<span class="ruby-identifier">column_index</span>)

  <span class="ruby-comment"># Go through each cell in column</span>
  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">each_with_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span>, <span class="ruby-identifier">row_index</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-comment"># Do not process blank rows</span>

    <span class="ruby-identifier">old_cell</span> = <span class="ruby-identifier">row</span>[<span class="ruby-identifier">column_index</span>]
    <span class="ruby-identifier">c</span> = <span class="ruby-keyword">nil</span>

    <span class="ruby-keyword">if</span> <span class="ruby-identifier">old_cell</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> <span class="ruby-operator">&amp;&amp;</span>
         <span class="ruby-identifier">old_range</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">old_range</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span> <span class="ruby-keyword">then</span>

      <span class="ruby-identifier">c</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:style_index</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">old_cell</span>.<span class="ruby-identifier">style_index</span>, <span class="ruby-value">:worksheet</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">self</span>,
                           <span class="ruby-value">:row</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">row_index</span>, <span class="ruby-value">:column</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">column_index</span>,
                           <span class="ruby-value">:datatype</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataType</span><span class="ruby-operator">::</span><span class="ruby-constant">SHARED_STRING</span>)
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">row</span>.<span class="ruby-identifier">insert_cell_shift_right</span>(<span class="ruby-identifier">c</span>, <span class="ruby-identifier">column_index</span>)
  }

  <span class="ruby-identifier">cols</span>.<span class="ruby-identifier">insert_column</span>(<span class="ruby-identifier">column_index</span>)

  <span class="ruby-comment"># Update merged cells for all rows below</span>
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
      <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">column_index</span>

      <span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">column_index</span>
      <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span>,
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span>,
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>,
      )
    }
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment"># TODO: update column numbers</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Inserts column at <code>column_index</code>, pushes everything right, takes styles from column to left NOTE: use of this method will break formulas which reference cells which are being “pushed right”</p>


        </div>





      </div>


      <div id="method-i-insert_row" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-insert_row" title="Link to this method">
                <span class="method-name">insert_row</span>
                <span class="method-args">(row_index = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="insert_row-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 73</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">insert_row</span>(<span class="ruby-identifier">row_index</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">validate_workbook</span>
  <span class="ruby-identifier">ensure_cell_exists</span>(<span class="ruby-identifier">row_index</span>)

  <span class="ruby-identifier">old_row</span> = <span class="ruby-identifier">new_cells</span> = <span class="ruby-keyword">nil</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">row_index</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">old_row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row_index</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">old_row</span> <span class="ruby-keyword">then</span>
      <span class="ruby-identifier">new_cells</span> = <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
                    <span class="ruby-keyword">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">then</span> <span class="ruby-keyword">nil</span>
                    <span class="ruby-keyword">else</span> <span class="ruby-identifier">nc</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Cell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:style_index</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">style_index</span>)
                         <span class="ruby-identifier">nc</span>.<span class="ruby-identifier">worksheet</span> = <span class="ruby-keyword">self</span>
                         <span class="ruby-identifier">nc</span>
                    <span class="ruby-keyword">end</span>
                  }
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">row0</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-value">0</span>]
  <span class="ruby-identifier">new_cells</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>((<span class="ruby-identifier">row0</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row0</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">size</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span>)

  <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-keyword">nil</span>)
  <span class="ruby-identifier">new_row</span> = <span class="ruby-identifier">add_row</span>(<span class="ruby-identifier">row_index</span>, <span class="ruby-value">:cells</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">new_cells</span>, <span class="ruby-value">:style_index</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">old_row</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">old_row</span>.<span class="ruby-identifier">style_index</span>)

  <span class="ruby-comment"># Update row values for all rows below</span>
  <span class="ruby-identifier">row_index</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">r</span>]
    <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">row</span>.<span class="ruby-identifier">cells</span>.<span class="ruby-identifier">each_with_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">cell</span>, <span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
      <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">nil?</span>
      <span class="ruby-identifier">cell</span>.<span class="ruby-identifier">r</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">r</span>, <span class="ruby-identifier">c</span>)
    }
  }

  <span class="ruby-comment"># Update merged cells for all rows below</span>
  <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-keyword">then</span>
    <span class="ruby-identifier">merged_cells</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">mc</span><span class="ruby-operator">|</span>
      <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">row_index</span>

      <span class="ruby-identifier">in_merged_cell</span> = <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">row_index</span>
      <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">in_merged_cell</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-value">1</span>),
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">row_range</span>.<span class="ruby-identifier">last</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>,
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">first</span>,
        <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">ref</span>.<span class="ruby-identifier">col_range</span>.<span class="ruby-identifier">last</span>,
      )
    }
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">return</span> <span class="ruby-identifier">new_row</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Inserts row at row_index, pushes down, copies style from the row above (that’s what Excel 2013 does!) NOTE: use of this method will break formulas which reference cells which are being “pushed down”</p>


        </div>





      </div>


      <div id="method-i-is_column_bolded" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_column_bolded" title="Link to this method">
                <span class="method-name">is_column_bolded</span>
                <span class="method-args">(col = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_column_bolded-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 341</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_bolded</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-is_column_italicized" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_column_italicized" title="Link to this method">
                <span class="method-name">is_column_italicized</span>
                <span class="method-args">(col = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_column_italicized-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 336</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_italicized</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-is_column_struckthrough" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_column_struckthrough" title="Link to this method">
                <span class="method-name">is_column_struckthrough</span>
                <span class="method-args">(col = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_column_struckthrough-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 351</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_struckthrough</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-is_column_underlined" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_column_underlined" title="Link to this method">
                <span class="method-name">is_column_underlined</span>
                <span class="method-args">(col = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_column_underlined-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 346</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_column_underlined</span>(<span class="ruby-identifier">col</span> = <span class="ruby-value">0</span>)
  <span class="ruby-identifier">font</span> = <span class="ruby-identifier">column_font</span>(<span class="ruby-identifier">col</span>)
  <span class="ruby-identifier">font</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-is_row_bolded" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_row_bolded" title="Link to this method">
                <span class="method-name">is_row_bolded</span>
                <span class="method-args">(row = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_row_bolded-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 267</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_bolded</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_bold</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-is_row_italicized" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_row_italicized" title="Link to this method">
                <span class="method-name">is_row_italicized</span>
                <span class="method-args">(row = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_row_italicized-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 263</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_italicized</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_italic</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-is_row_struckthrough" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_row_struckthrough" title="Link to this method">
                <span class="method-name">is_row_struckthrough</span>
                <span class="method-args">(row = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_row_struckthrough-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 275</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_struckthrough</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_strikethrough</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-is_row_underlined" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_row_underlined" title="Link to this method">
                <span class="method-name">is_row_underlined</span>
                <span class="method-args">(row = 0)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_row_underlined-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 271</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_row_underlined</span>(<span class="ruby-identifier">row</span> = <span class="ruby-value">0</span>)
  (<span class="ruby-identifier">font</span> = <span class="ruby-identifier">row_font</span>(<span class="ruby-identifier">row</span>)) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">font</span>.<span class="ruby-identifier">is_underlined</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-merge_cells" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-merge_cells" title="Link to this method">
                <span class="method-name">merge_cells</span>
                <span class="method-args">(*params)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="merge_cells-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 695</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">merge_cells</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">params</span>)
  <span class="ruby-identifier">validate_workbook</span>

  <span class="ruby-identifier">row_from</span> = <span class="ruby-identifier">col_from</span> = <span class="ruby-identifier">row_to</span> = <span class="ruby-identifier">col_to</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-keyword">case</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">size</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">4</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">row_from</span>, <span class="ruby-identifier">col_from</span>, <span class="ruby-identifier">row_to</span>, <span class="ruby-identifier">col_to</span> = <span class="ruby-identifier">params</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">1</span> <span class="ruby-keyword">then</span>
    <span class="ruby-keyword">case</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">first</span>
    <span class="ruby-keyword">when</span> <span class="ruby-constant">Hash</span> <span class="ruby-keyword">then</span>
      <span class="ruby-identifier">row_from</span>, <span class="ruby-identifier">row_to</span>, <span class="ruby-identifier">col_from</span>, <span class="ruby-identifier">col_to</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">fetch_values</span>(<span class="ruby-value">:row_from</span>, <span class="ruby-value">:row_to</span>, <span class="ruby-value">:col_from</span>, <span class="ruby-value">:col_to</span>)
    <span class="ruby-keyword">when</span> <span class="ruby-constant">String</span> <span class="ruby-keyword">then</span>
      <span class="ruby-identifier">from</span>, <span class="ruby-identifier">to</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">split</span>(<span class="ruby-string">&#39;:&#39;</span>)
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;reference for merging cells must be a range&quot;</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">to</span>.<span class="ruby-identifier">nil?</span>
      <span class="ruby-identifier">row_from</span>, <span class="ruby-identifier">col_from</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">ref2ind</span>(<span class="ruby-identifier">from</span>)
      <span class="ruby-identifier">row_to</span>, <span class="ruby-identifier">col_to</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">ref2ind</span>(<span class="ruby-identifier">to</span>)
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;invalid value for #{self.class}: #{params[0].inspect}&quot;</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">params</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">merged_cells</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">MergedCells</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-comment"># TODO: add validation to make sure ranges are not intersecting with existing ones</span>
  <span class="ruby-identifier">merged_cells</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">MergedCell</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:ref</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">row_from</span>, <span class="ruby-identifier">row_to</span>, <span class="ruby-identifier">col_from</span>, <span class="ruby-identifier">col_to</span>))
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Merges cells within a rectangular area <a href="WorksheetConvenienceMethods.html#method-i-merge_cells"><code>merge_cells(row_from, col_from, row_to, col_to)</code></a> <a href="WorksheetConvenienceMethods.html#method-i-merge_cells"><code>merge_cells(reference_string)</code></a> <a href="WorksheetConvenienceMethods.html#method-i-merge_cells"><code>merge_cells</code></a>(row_from:, row_to:, col_from:, col_to:)</p>


        </div>





      </div>


      <div id="method-i-row_font" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-row_font" title="Link to this method">
                <span class="method-name">row_font</span>
                <span class="method-args">(row)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="row_font-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 300</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">row_font</span>(<span class="ruby-identifier">row</span>)
  (<span class="ruby-identifier">row</span> = <span class="ruby-identifier">sheet_data</span>.<span class="ruby-identifier">rows</span>[<span class="ruby-identifier">row</span>]) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">get_font</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


    </section>

  </section>

</main>
</body>

